import request from '@/utils/request'

export function loginUser(data) {
	return request({
		url: '/user/loginUser',
		method: 'post',
		data
	})
}

export function registerUser(data) {
	return request({
		url: '/user/registerUser',
		method: 'post',
		data
	})
}

export function loginOutUser() {
	return request({
		url: '/user/loginOutUser',
		method: 'get'
	})
}

export function getSalerById(id) {
	return request({
		url: '/user/getSalerById',
		method: 'get',
		params: {
			id
		}
	})
}

export function changePwd(oldPwd, newPwd) {
	return request({
		url: '/user/changePwd',
		method: 'post',
		params: {
			oldPwd: oldPwd,
			newPwd: newPwd
		}
	})
}

export function getVerifyCode(name) {
	return request({
		url: '/user/getVerifyCode',
		method: 'get',
		params: {
			name
		}
	})
}
export function forgetPwd(data) {
	return request({
		url: '/user/forgetPwd',
		method: 'post',
		data
	})
}
